import axios from 'axios'
export const getCloudInfo = async (params) => {
    return axios
        .get("/api/resource/collector/statistics/getCloudInfo", {})
        .then((response) => {
            return response.data.data.result
        })
        .catch((error) => {
            console.log(error);
            return error
        });

}


export const vmware = async (params) => {
    return axios
        .post("/api/resource/collector/statistics/vmware", {})
        .then((response) => {
            return response.data.data.result
        })
        .catch((error) => {
            console.log(error);
            return error
        });

}


export const hWStack = async (params) => {
    return axios
        .post("/api/resource/collector/statistics/hWStack", {})
        .then((response) => {
            return response.data.data.result
        })
        .catch((error) => {
            console.log(error);
            return error
        });

}



export const vdcCount = async (params) => {
    return axios
        .post("/api/resource/HW_CLOUD_TENANT_VDC/count", {})
        .then((response) => {
            console.log(22222,response);
            return response.data

        })
        .catch((error) => {
            console.log(error);
            return error
        });
}

export const projectCount = async (params) => {
    return axios
        .post("/api/resource/HW_CLOUD_TENANT_PROJECT_VDC/count", {})
        .then((response) => {
            return response.data
        })
        .catch((error) => {
            console.log(error);
            return error
        });

}



export const businessQueryList = async (params) => {
    return axios
        .post("/api/resource/collector/statistics/BUSINESS/queryList", {})
        .then((response) => {
            return response.data.result
        })
        .catch((error) => {
            console.log(error);
            return error
        });

}


export const zjBusinessQueryList = async (params) => {
    return axios
        .post("/api/resource/collector/statistics/BUSINESS/queryList", {})
        .then((response) => {
            return response.data.result
        })
        .catch((error) => {
            console.log(error);
            return error
        });

}